#ifndef DISPLAY_INCLUDED
#define DISPLAY_INCLUDED

#pragma once

#include <d3d11.h>

#include "com_ptr.h"

class Display
{
public:
	Display(ID3D11Device* device, HWND hwnd, unsigned int width, unsigned int height, bool windowed);
	void Resize(unsigned int width, unsigned int height);
	void ClearScreen(FLOAT color[]);
	void Present();
	com_ptr<ID3D11RenderTargetView> GetRenderTargetView() const;
private:
	const static DXGI_FORMAT DisplayFormat = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
	const static unsigned int DisplayFlags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;

	com_ptr<ID3D11Device>				m_Device;
	com_ptr<IDXGISwapChain>				m_SwapChain;
	com_ptr<ID3D11RenderTargetView>     m_RenderTargetView;
};

#endif // DISPLAY_INCLUDED